package com.morningstar.flow.antvX6.common;

import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.flowable.bpmn.model.Process;

@Getter
@Setter
public abstract class Node {
    /**
     * 节点Id
     */
    private String id;

    /**
     * 节点类型
     */
    private String shape;

    /**
     * 节点名称
     */
    private String label;

    /**
     * 节点属性
     */
    private Attrs attrs;

    /**
     * 节点数据
     */
    private NodeData data;

    public String getCName() {
        return "n_" + StringUtils.replace(this.getId(), "-", "");
    }

    public abstract void convertAndAdd(Process process);

    public abstract String getNodeType();

    public abstract String getNodeName();
}
